package com.mmx.service;

import com.mmx.domain.entity.FlowInstance;

import java.util.Map;

/**
 * @desc: 运行服务
 * @author: liushuai
 * @date: 2023/1/21 14:45
 */
public interface RuntimeService {

     /**
      * 根据流程定义Key启动流程
      * @param definitionKey 流程定义Key
      * @param businessId 业务Id
      * @param variables 流程变量
      * @param instanceName 流程实例名称，非必填默认 flow
      * @param ext1 扩展查询,非必填
      * @param ext2 扩展查询
      * @param ext3 扩展查询
      * @param createUser
      * @param comment
      * @return: com.mmx.domain.entity.FlowInstance
      * @Author: liushuai
      * @Date: 2023/2/8 14:57
      */
     FlowInstance startFlowByDefinitionKey(String definitionKey, String businessId, Map<String, Object> variables, String instanceName, String ext1, String ext2, String ext3, String createUser,String comment);


     /**
      * 完成任务
      * @param taskId
      * @param variables
      * @param approveType
      * @Author: liushuai
      * @Date: 2023/3/30 15:35
      */
     void complete(Long taskId,Map<String, Object> variables,Integer approveType);

}
